package day06_exception_collection.com.itheima.d4_collection_travesal;

import java.util.ArrayList;

public class Demo4_Test {
    public static void main(String[] args) {
        ArrayList<Movie> movies = new ArrayList<>();
        movies.add(new Movie("唐顿庄园", "热巴", 9.5));
        movies.add(new Movie("唐顿庄园2", "小宝", 9.0));
        movies.add(new Movie("唐顿庄园3", "小宝", 9.0));

        for (Movie movie : movies) {
            System.out.println("movie = " + movie);
            System.out.println("电影名称：" + movie.getName());
            System.out.println("主演：" + movie.getActor());
            System.out.println("评分：" + movie.getScore());
        }
    }
}
